2023-11-15


Vitest - pass props to render
It’s possible to pass props to render if the component you’re testing needs them.
const { container } = render(Layout, {
  props: {
    data,
  },
});
In this case I’m passing load function data to my layout route.
Go back to all posts